package com.xiaoyu.lanling.feature.accost.data

import android.text.TextUtils
import com.xiaoyu.base.net.RequestCreator
import com.xiaoyu.lanling.common.config.HttpConfig
import com.xiaoyu.lanling.event.accost.QuickAccostBatchEvent
import com.xiaoyu.lanling.event.accost.QuickAccostRecommendEvent

class AccostData {

    companion object {
        fun accostRecommend(requestTag: Any) {
            RequestCreator.create<QuickAccostRecommendEvent>(requestTag, QuickAccostRecommendEvent::class.java)
                    .setRequestUrl(HttpConfig.LANLING_ACCOST_RECOMMEND)
                    .enqueue()
        }

        fun accostBatch(requestTag: Any, toUids: List<String>) {
            RequestCreator.create<QuickAccostBatchEvent>(requestTag, QuickAccostBatchEvent::class.java)
                    .setRequestUrl(HttpConfig.LANLING_ACCOST_BATCH)
                    .addQueryData("toUids", TextUtils.join(",", toUids))
                    .enqueue()
        }
    }
}